<template>
  <div class="g2-pagination-footer">
    <el-pagination
      :current-page="currentPage"
      :page-size="pageNumber"
      :total="totalNumber"
      :layout="layout"
      style="margin: -10px;"
      @current-change="handleCurrentChange"
    ></el-pagination>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "g2ExampleTableFooter",
  props: {},
  computed: {
    ...mapGetters("examples/table", {
      currentPage: "g_page_currentPage",
      pageNumber: "g_page_pageNumber",
      totalNumber: "g_page_totalNumber",
      layout: "g_page_layout"
    })
  },
  methods: {
    handleCurrentChange(val) {
      this.$store.dispatch("examples/table/reloadActivityByPage", {
        currentPage: val
      });
    }
  }
};
</script>

<style scoped lang="scss">
</style>
